﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UtopianGame.graphics.menu;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace UtopianGame.graphics.menu
{
    class Region_Button4 : MenuButton
    {
        protected String message = "";
        String unselectedSpriteName;
        String selectedSpriteName;
        Texture2D unselectedSprite;
        Texture2D selectedSprite;


        public Region_Button4()
        {
        }

        public Region_Button4(ContentManager cm)
        {
            init(cm);
        }

        protected override void init(ContentManager cm)
        {
            base.init(cm);
            unselectedSpriteName = "region4Button";
            selectedSpriteName = "selectedRegionButton";
            spriteName = unselectedSpriteName;
            unselectedSprite = cm.Load<Texture2D>(unselectedSpriteName);
            selectedSprite = cm.Load<Texture2D>(selectedSpriteName);
            sprite = cm.Load<Texture2D>(spriteName);
            clickable = true;
            boundingBox.Width = 64;
            boundingBox.Height = 64;
        }

        public override void draw(SpriteBatch sb)
        {
            base.draw(sb);
            if (GlobalDataHolder.currentlySelectedRegion == 3)
            {
                spriteName = selectedSpriteName;
                sprite = selectedSprite;
            }
            else
            {
                spriteName = unselectedSpriteName;
                sprite = unselectedSprite;
            }
        }




        protected override void executeFunction()
        {
            //activate region
            GlobalDataHolder.currentlySelectedRegion = 3;

        }
    }
}